package ProjectTeam39.GUITest;

import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JComboBox;
import javax.swing.JSplitPane;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class createRecordFrame extends JFrame {
	private JTextField textField;
	private JTextField textField_1;
	private JTextField textField_2;
	private JTextField textField_3;
	private JTextField textField_4;
	createRecordFrame rframe;
	JFrame lastframe;
	
	public createRecordFrame(JFrame frame) {
		rframe = this;
		lastframe = frame;
		String[] comboBoxList = {"Appt1", "Appt2", "Appt3"};
		JPanel panel = new JPanel();
		getContentPane().add(panel, BorderLayout.NORTH);
		
		JLabel lblCreateTreatmentRecord = new JLabel("Create Treatment Record");
		lblCreateTreatmentRecord.setFont(new Font("Tahoma", Font.PLAIN, 14));
		panel.add(lblCreateTreatmentRecord);
		
		JPanel panel_1 = new JPanel();
		getContentPane().add(panel_1, BorderLayout.CENTER);
		panel_1.setLayout(null);
		
		JLabel lblNewLabel = new JLabel("Appointment");
		lblNewLabel.setBounds(10, 11, 70, 14);
		panel_1.add(lblNewLabel);
		
		JLabel lblNewLabel_1 = new JLabel("Doctor");
		lblNewLabel_1.setBounds(10, 36, 46, 14);
		panel_1.add(lblNewLabel_1);
		
		JLabel lblNurse = new JLabel("Nurse");
		lblNurse.setBounds(10, 61, 46, 14);
		panel_1.add(lblNurse);
		
		JComboBox Appointment_Box = new JComboBox();
		Appointment_Box.setBounds(80, 8, 83, 20);
		panel_1.add(Appointment_Box);
		
		JComboBox Doctor_Box = new JComboBox();
		Doctor_Box.setBounds(82, 34, 81, 18);
		panel_1.add(Doctor_Box);
		
		JComboBox comboBox = new JComboBox();
		comboBox.setBounds(82, 58, 81, 20);
		panel_1.add(comboBox);
		
		textField = new JTextField();
		textField.setBounds(80, 89, 86, 20);
		panel_1.add(textField);
		textField.setColumns(10);
		
		textField_1 = new JTextField();
		textField_1.setBounds(80, 120, 86, 20);
		panel_1.add(textField_1);
		textField_1.setColumns(10);
		
		textField_2 = new JTextField();
		textField_2.setBounds(80, 149, 86, 20);
		panel_1.add(textField_2);
		textField_2.setColumns(10);
		
		JLabel lblNewLabel_2 = new JLabel("Height (in)");
		lblNewLabel_2.setBounds(10, 92, 70, 14);
		panel_1.add(lblNewLabel_2);
		
		JLabel lblNewLabel_3 = new JLabel("Weight (lbs)");
		lblNewLabel_3.setBounds(10, 123, 70, 14);
		panel_1.add(lblNewLabel_3);
		
		JLabel lblNewLabel_4 = new JLabel("Temperature");
		lblNewLabel_4.setBounds(10, 152, 70, 14);
		panel_1.add(lblNewLabel_4);
		
		textField_3 = new JTextField();
		textField_3.setBounds(80, 177, 86, 20);
		panel_1.add(textField_3);
		textField_3.setColumns(10);
		
		JLabel lblBloodPressure = new JLabel("Blood Pressure");
		lblBloodPressure.setBounds(0, 180, 80, 14);
		panel_1.add(lblBloodPressure);
		
		textField_4 = new JTextField();
		textField_4.setBounds(235, 115, 164, 89);
		panel_1.add(textField_4);
		textField_4.setColumns(10);
		
		JLabel lblOtherSymptoms = new JLabel("Other Symptoms");
		lblOtherSymptoms.setBounds(181, 92, 86, 14);
		panel_1.add(lblOtherSymptoms);
		
		JComboBox comboBox_1 = new JComboBox();
		comboBox_1.setBounds(235, 55, 83, 20);
		panel_1.add(comboBox_1);
		
		JLabel lblDoctorsOrders = new JLabel("Doctor's Orders");
		lblDoctorsOrders.setBounds(181, 36, 86, 14);
		panel_1.add(lblDoctorsOrders);
		
		JSplitPane splitPane = new JSplitPane();
		splitPane.setBounds(123, 214, 179, 25);
		panel_1.add(splitPane);
		
		JButton btnSubmit = new JButton("Submit");
		splitPane.setLeftComponent(btnSubmit);
		
		JButton btnBack = new JButton("Back");
		btnBack.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				rframe.setVisible(false);
				lastframe.setVisible(true);
			}
		});
		splitPane.setRightComponent(btnBack);
		int i = 0;
		while(i<comboBoxList.length){
			Appointment_Box.addItem(comboBoxList[i]);
			i++;
		}
		
	}
}
